import Cookies from 'js-cookie'

const TokenKey = 'Admin-Token'
const RefreshTokenKey = 'Admin-refresh-Token'

// access_token存取
export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

// refresh_token存取
export function getTokenRefresh() {
  return Cookies.get(RefreshTokenKey)
}

export function setTokenRefresh(token) {
  return Cookies.set(RefreshTokenKey, token)
}

export function removeTokenRefresh() {
  return Cookies.remove(RefreshTokenKey)
}
